package com.it1997.astar;

/**
 *
 */
public class Point {
    int x, y; // 坐标

    Point(int x, int y) { // 坐标有参构造方法
        this.x = x;
        this.y = y;
    }

    /**
     * 重写equals方法,横纵坐标相等
     *
     * @param object
     * @return 是否相等
     */
    @Override
    public boolean equals(Object object) {
        return object != null && object instanceof Point && ((Point) object).x == x && ((Point) object).y == y;
    }

}
